package com.yinhe.module.xmd;

import com.yinhe.common.annotation.Log;
import com.yinhe.common.core.controller.BaseController;
import com.yinhe.common.core.domain.AjaxResult;
import com.yinhe.common.core.page.TableDataInfo;
import com.yinhe.common.enums.BusinessType;
import com.yinhe.common.utils.poi.ExcelUtil;
import com.yinhe.system.domain.SysKnowledge;
import com.yinhe.system.service.ISysKnowledgeService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.web.bind.annotation.*;

import javax.servlet.http.HttpServletResponse;
import java.util.List;

/**
 * 知识存储Controller
 * 
 * @author Chen Mu
 * @date 2022-05-15
 */
@RestController
@RequestMapping("/xmd/knowledge")
public class XmdKnowledgeController extends BaseController
{
    @Autowired
    private ISysKnowledgeService sysKnowledgeService;

    /**
     * 查询知识存储列表
     */
    //@PreAuthorize("@ss.hasPermi('xmd:knowledge:list')")
    @GetMapping("/list")
    public TableDataInfo list(SysKnowledge sysKnowledge)
    {
        startPage();
        List<SysKnowledge> list = sysKnowledgeService.selectSysKnowledgeList(sysKnowledge);
        return getDataTable(list);
    }

}
